/**
 * Created by dong on 2017/2/21.
 */

import * as WXBizMsgCrypt from "wechat-crypto";
import CONFIG from "../config";

const cryptor = new WXBizMsgCrypt(CONFIG.token, CONFIG.encodingAESKey, CONFIG.appID);

function decrypt(content) {
    return cryptor.decrypt(content);
}
function encrypt(content) {
    return cryptor.encrypt(content);
}
function getSignature(timestamp, nonce, encryptMessage) {
    return cryptor.getSignature(timestamp, nonce, encryptMessage);
}
export default {decrypt, encrypt, getSignature};
export {decrypt, encrypt, getSignature};
